home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software of the Month Club (Business) 1998 January
/
Software of the Month Club - Business Shareware (Volume 245) (January 1998).iso
/
dos
/
biz
/
train
/
pack1.prg
/
TEMP2
/
CONVERT.SC
< prev
next >
Wrap
Text File
|
1992-05-18
|
4KB
|
160 lines
PROC init_screen()
; *****************************************************************
; Iinitializes the screen to look somewhat like DataEase
; *****************************************************************
; Clear the first 2 lines in the correct colors
STYLE ATTRIBUTE 14
@ 0,0
?? SPACES(80)
STYLE ATTRIBUTE 32
@ 1,0
?? SPACES(80)
CLEAR EOL
;clear the rest of the screen
STYLE ATTRIBUTE 14
FOR x FROM 2 to 24
@ x,0
?? SPACES(80)
ENDFOR
@ 0,0
?? "DataEase Convert 1.1"
; Function key line
@ 24,0
?? "ESC:"
STYLE ATTRIBUTE 79
?? "EXIT"
STYLE ATTRIBUTE 32
@ 1,0
?? "Exporting Data From Paradox to DataEase..."
;draw a box in the middle of the screen
STYLE ATTRIBUTE 14
@ 7,10
?? "╓──────────────────────────────────────────────────────────────╖"
FOR x FROM 8 to 15
@ x,10
?? "║ ║"
ENDFOR
@ 16,10
?? "╙──────────────────────────────────────────────────────────────╜"
ENDPROC
PROC get_out()
BEEP
STYLE ATTRIBUTE 12
@ 14,20
?? "ESC Pressed. Press Any Key to Exit..."
x = GETCHAR()
EXIT ; Terminates Paradox and returns to DataEase
ENDPROC
PROC handle_errors()
; *****************************************************************
;
; This procedure handles any errors that may show up
;
; *****************************************************************
PRIVATE Errorproc ; Prevent errors within the error handler
BEEP
@ 12,20
?? ERRORMESSAGE() ;print the error that occured
STYLE ATTRIBUTE 12
@ 14,20
?? "An Error has occured. Press Any Key to Exit..."
x = GETCHAR()
EXIT ; Terminates Paradox on any error
ENDPROC
PROC convert_file(form_name,data_file)
; *****************************************************************
;
; This is the procedure that actually converts the
; Paradox files to ASCII format for import
; into DataEase
;
; *****************************************************************
STYLE ATTRIBUTE 14
@ 10,20
?? " "
@ 10,20
?? "Exporting "+form_name+" to DataEase..."
{Tools}{ExportImport}{Export}{Ascii}{Delimited}
SELECT form_name ;SELECT is necessary to substitute a variable name
SELECT data_file ;For a text entry
; check for any keyboard activity
WHILE CHARWAITING()
x = GETCHAR()
IF x = 27 THEN ;ESC pressed
get_out()
ENDIF
ENDWHILE
ENDPROC
; *****************************************************************
; This line sets the error handling procedure
; You may substitute your own error handler
; *****************************************************************
Errorproc = "handle_errors" ; Error handling PROC
init_screen() ; initializes screen colors, etc
; *****************************************************************
; This line sets the default data file directory
; DO NOT change it!!
; *****************************************************************
##1 {Tools} {More} {Directory} {%s} {OK}
; *****************************************************************
;
; You may place any paradox commands you want above
; or below the section labeled 'DATAEASE.CONVERT'
; Modifying any of the lines within this routine can cause
; CONVERT to work incorrectly
; *****************************************************************
; * DATAEASE.CONVERT *
; * *
; *****************************************************************
##2 convert_file("%s","%s")
##3 EXIT ; Terminates Paradox
; *****************************************************************
; * END.CONVERT *
; * *
; *****************************************************************